package lifei.lifei.spring.proxy;

/**
 * @author 小李
 * @version 1.0
 * @date 2021/9/28 10:45
 */
//代理角色
public class Proxy implements Rent{
    private Host host;
    Proxy(){}
    Proxy(Host host){
        this.host=host;
    }
    //看房
    public void seeHouse(){
        System.out.println("带房客看房子");
    }
    //收中介费
    public void fare(){
        System.out.println("收房费");
    }
    //租房
    @Override
    public void rent(){
        seeHouse();
        host.rent();
        fare();

    }
}
